/*
* Copyright 2011 Joshua Carbonneau
*
* This file is part of Texture Chaos.
*
* Texture Chaos is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Texture Chaos is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Texture Chaos.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdlib.h>
#include <string.h>
#include <stdarg.h>

#ifndef SCRAMBLER_H
#define SCRAMBLER_H

// File names and executable name
char* infileName;
char* outfileName;
char* texmapName;
char* exName;

int debugLevel; // Level of debug messages
int numSwitches; // Number of tile switches to perform
int numShifts; // Number of tile color shifts to perform
int numRandoms; // Number of tile color randomizations to perform
int numAverages; // Number of tile color averages to perform

/*******************************************
* Convert a string into an integer         *
* a: The string to convert                 *
* returns: The integer representation of a *
********************************************/
int str2int(char* a);

/***************************************
* Parse the command line arguments and *
* set variables accordingly            *
* argc: Number of arguments            *
* argv: Array of argument strings      *
****************************************/
void parseArgs(int argc, char** argv);

/*******************************************
* Print a message to stdout (if debugLevel * 
* is greater or equal to level).           *
* level: The level of the debug message    *
* format: Format string                    *
********************************************/
void debug(int level, char *format, ...);

/********************************************
* Free strings for filenames and executable *
*********************************************/
void freeStrings();

/*******************************************
* Print the usage of the program to stdout *
********************************************/
void printUsage();

#endif
